#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
	int num[] = { 0,1,2,3,4,5,6,7,8,9,10 };
	int left = 0;
	int right = sizeof(num) / sizeof(num[0]);
	int search = 7;
	while (left <= right) {
		int mid = left + (right - left) / 2;
		if (num[mid] < search) {
			left = mid;
		}
		if (num[mid] > search) {
			right = mid;
		}
		if (num[mid] == search) {
			printf("find out he is position %d th\n", mid);
			break;
		}
	}
	if (left > right) {
		printf("sorry we cant find it\n");
	}
	
	return 0;
}
	